DataGetDiMon

 

The 'DataGetDiMon' function returns the DI tag data stored in file.

 

double DataGetDiMon(string tag, int data_type, int year, int mon);

 

Note : Because this function loads the data from a file, it may take a long time to excute this function. If you use this function much, the execution speed of LocalMain program slows down. Therefore, it is better to use this function only when it is absolutely necessary.

 

Parameters

string tag : AI tag name

int data_type : Data type that you want to load (0 = ON time, 1 = OFF time, 2 = the number of ON/OFF )

int year : Year

int mon : Month

 

Return Value

Tag data of the specified day (If the data type is '0' or '1', the type of return value is the second unit. If the data type is '2', the type ofreturn value is the number unit.) 

 

Example 1

@DataGetDiMon("DI_0000", 0, 1999, 12);

Description : The 'DI_0000' ON time of December 1999 is loaded.

 

Example 2

@DataGetDiMon("DI_0000", 2, 1999, 12);

Description : The number of 'DI_0000' ON/OFF of December 1999 is loaded.

 

Relate items)

@DataGetAiDay()

@DataGetAiHour()

@DataGetAiMin()

@DataGetAiMon()

@DataGetAiYear()

@DataGetDiDay()

@DataGetDiHour()

@DataGetDiMin()

@DataGetDiYear()

@DataSetAiHour()

@DataSetAiMin()

Example Project to load the data of the specified time